<!-- <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Simple HTTP Server</title>
</head>
<body>
    <h1>🎉 HTTP服务器运行成功！</h1>\n"
    <p>这是一个用C++编写的简单HTTP服务器</p>\n"
    <p>当前时间: <span id='time'></span></p>\n"
    <script>document.getElementById('time').innerText = new Date();</script>\n"
</body>
</html> -->

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Welcome to My HTTP Server</title>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;700&display=swap');

        body {
            font-family: 'Noto Sans SC', 'Helvetica Neue', Arial, sans-serif;
            background-color: #f0f2f5;
            color: #333;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            text-align: center;
        }

        .container {
            background-color: #ffffff;
            padding: 40px 60px;
            border-radius: 12px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
            max-width: 600px;
            width: 90%;
            transition: transform 0.3s ease-in-out;
        }

        .container:hover {
            transform: translateY(-5px);
        }

        h1 {
            color: #007bff;
            font-size: 2.5em;
            margin-bottom: 20px;
            font-weight: 700;
        }

        p {
            font-size: 1.2em;
            line-height: 1.6;
            margin-bottom: 25px;
            font-weight: 300;
        }

        .time {
            font-size: 1em;
            color: #555;
            background-color: #f9f9f9;
            padding: 10px 15px;
            border-radius: 6px;
            border: 1px solid #eee;
            display: inline-block;
            font-weight: 400;
        }

        footer {
            margin-top: 30px;
            font-size: 0.9em;
            color: #888;
        }
    </style>
</head>
<body>

    <div class="container">
        <h1>🎉 Welcome! 🎉</h1>
        <p>如果看到这个页面，说明你的自定义 HTTP 服务器已经成功运行。</p>
        <div class="time" id="current-time">
            正在加载时间...
        </div>
        <footer>
            Powered by Your Awesome HTTP Server
        </footer>
    </div>

    <script>
        function updateTime() {
            const timeElement = document.getElementById('current-time');
            if (timeElement) {
                const now = new Date();
                const formattedTime = now.toLocaleDateString('zh-CN') + ' ' + now.toLocaleTimeString('zh-CN');
                timeElement.textContent = '当前服务器时间: ' + formattedTime;
            }
        }

        // 立即更新一次，然后每秒更新一次
        updateTime();
        setInterval(updateTime, 1000);
    </script>

</body>
</html>